using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ItdavanyViewer
{
    public partial class XNAViewport : Form
    {
        XNAView view = null;

        public XNAViewport() : this(new XNAView())
        {            
        }

        public XNAViewport(XNAView view)
        {
            this.view = view;
            InitializeComponent();
            this.Controls.Add(this.view);
            this.view.Dock = DockStyle.Fill;
            //this.view.Size = this.ClientSize;
            //this.view.Location = new Point(0, 0);
            this.view.ResetGraphicsDevice();
            this.Resize += new EventHandler(XNAViewport_Resize);
        }

        void XNAViewport_Resize(object sender, EventArgs e)
        {   
            this.view.ResetGraphicsDevice();
        }

        public XNAView View
        {
            get
            {
                return view;
            }
        }
    }
}